package com.feib.stms.service;

import java.io.IOException;

import javax.mail.MessagingException;

import org.springframework.transaction.annotation.Transactional;
import com.feib.stms.model.MailQueue;

@Transactional(readOnly = true)
public interface MailJobService 
{
   
    public void execute();

    public void execute(Long mailQueuePk);
   
        
    public void execute(MailQueue mailQueue);

    /**
     * 發送郵件
     * @param mailQueue 代處理郵件
     * @throws MessagingException
     * @throws IOException 
     */
    public void send(MailQueue mailQueue) throws MessagingException, IOException;
    
    
    public void createAndSend(MailQueue mailQueue) throws Exception;

}
